<?php
/**
 * ExtButton class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftware B.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */

class ExtButton extends ExtButtonBase
{
    /**
     * Gets the value of ExtJS allowDepress property
     * @return Boolean 
     */
    public function getAllowDepress()
    {
    	return $this->getConfig("allowdepress");
    }

    /**
     * Sets the value of ExtJS allowDepress property
     * @param Boolean $value 
     */
    public function setAllowDepress($value)
    {
    	$this->setConfig("allowdepress",$value);
    }

    /**
     * Gets the value of ExtJS arrowAlign property
     * @return String 
     */
    public function getArrowAlign()
    {
    	return $this->getConfig("arrowalign");
    }

    /**
     * Sets the value of ExtJS arrowAlign property
     * @param String $value 
     */
    public function setArrowAlign($value)
    {
    	$this->setConfig("arrowalign",$value);
    }

    /**
     * Gets the value of ExtJS autoWidth property
     * @return Boolean 
     */
    public function getAutoWidth()
    {
    	return $this->getConfig("autowidth");
    }

    /**
     * Sets the value of ExtJS autoWidth property
     * @param Boolean $value 
     */
    public function setAutoWidth($value)
    {
    	$this->setConfig("autowidth",$value);
    }

    /**
     * Gets the value of ExtJS buttonSelector property
     * @return String 
     */
    public function getButtonSelector()
    {
    	return $this->getConfig("buttonselector");
    }

    /**
     * Sets the value of ExtJS buttonSelector property
     * @param String $value 
     */
    public function setButtonSelector($value)
    {
    	$this->setConfig("buttonselector",$value);
    }

    /**
     * Gets the value of ExtJS clickEvent property
     * @return String 
     */
    public function getClickEvent()
    {
    	return $this->getConfig("clickevent");
    }

    /**
     * Sets the value of ExtJS clickEvent property
     * @param String $value 
     */
    public function setClickEvent($value)
    {
    	$this->setConfig("clickevent",$value);
    }

    /**
     * Gets the value of ExtJS cls property
     * @return String 
     */
    public function getCls()
    {
    	return $this->getConfig("cls");
    }

    /**
     * Sets the value of ExtJS cls property
     * @param String $value 
     */
    public function setCls($value)
    {
    	$this->setConfig("cls",$value);
    }

    /**
     * Gets the value of ExtJS disabled property
     * @return Boolean 
     */
    public function getDisabled()
    {
    	return $this->getConfig("disabled");
    }

    /**
     * Sets the value of ExtJS disabled property
     * @param Boolean $value 
     */
    public function setDisabled($value)
    {
    	$this->setConfig("disabled",$value);
    }

    /**
     * Gets the value of ExtJS enableToggle property
     * @return Boolean 
     */
    public function getEnableToggle()
    {
    	return $this->getConfig("enabletoggle");
    }

    /**
     * Sets the value of ExtJS enableToggle property
     * @param Boolean $value 
     */
    public function setEnableToggle($value)
    {
    	$this->setConfig("enabletoggle",$value);
    }

    /**
     * Gets the value of ExtJS handleMouseEvents property
     * @return Boolean 
     */
    public function getHandleMouseEvents()
    {
    	return $this->getConfig("handlemouseevents");
    }

    /**
     * Sets the value of ExtJS handleMouseEvents property
     * @param Boolean $value 
     */
    public function setHandleMouseEvents($value)
    {
    	$this->setConfig("handlemouseevents",$value);
    }

    /**
     * Gets the value of ExtJS handler property
     * @return Function 
     */
    public function getHandler()
    {
    	return $this->getConfig("handler");
    }

    /**
     * Sets the value of ExtJS handler property
     * @param Function $value 
     */
    public function setHandler($value)
    {
    	$this->setConfig("handler",$value);
    }

    /**
     * Gets the value of ExtJS hidden property
     * @return Boolean 
     */
    public function getHidden()
    {
    	return $this->getConfig("hidden");
    }

    /**
     * Sets the value of ExtJS hidden property
     * @param Boolean $value 
     */
    public function setHidden($value)
    {
    	$this->setConfig("hidden",$value);
    }

    /**
     * Gets the value of ExtJS icon property
     * @return String 
     */
    public function getIcon()
    {
    	return $this->getConfig("icon");
    }

    /**
     * Sets the value of ExtJS icon property
     * @param String $value 
     */
    public function setIcon($value)
    {
    	$this->setConfig("icon",$value);
    }

    /**
     * Gets the value of ExtJS iconAlign property
     * @return String 
     */
    public function getIconAlign()
    {
    	return $this->getConfig("iconalign");
    }

    /**
     * Sets the value of ExtJS iconAlign property
     * @param String $value 
     */
    public function setIconAlign($value)
    {
    	$this->setConfig("iconalign",$value);
    }

    /**
     * Gets the value of ExtJS iconCls property
     * @return String 
     */
    public function getIconCls()
    {
    	return $this->getConfig("iconcls");
    }

    /**
     * Sets the value of ExtJS iconCls property
     * @param String $value 
     */
    public function setIconCls($value)
    {
    	$this->setConfig("iconcls",$value);
    }

    /**
     * Gets the value of ExtJS menuAlign property
     * @return String 
     */
    public function getMenuAlign()
    {
    	return $this->getConfig("menualign");
    }

    /**
     * Sets the value of ExtJS menuAlign property
     * @param String $value 
     */
    public function setMenuAlign($value)
    {
    	$this->setConfig("menualign",$value);
    }

    /**
     * Gets the value of ExtJS minWidth property
     * @return Number 
     */
    public function getMinWidth()
    {
    	return $this->getConfig("minwidth");
    }

    /**
     * Sets the value of ExtJS minWidth property
     * @param Number $value 
     */
    public function setMinWidth($value)
    {
    	$this->setConfig("minwidth",$value);
    }

    /**
     * Gets the value of ExtJS overflowText property
     * @return String 
     */
    public function getOverflowText()
    {
    	return $this->getConfig("overflowtext");
    }

    /**
     * Sets the value of ExtJS overflowText property
     * @param String $value 
     */
    public function setOverflowText($value)
    {
    	$this->setConfig("overflowtext",$value);
    }

    /**
     * Gets the value of ExtJS pressed property
     * @return Boolean 
     */
    public function getPressed()
    {
    	return $this->getConfig("pressed");
    }

    /**
     * Sets the value of ExtJS pressed property
     * @param Boolean $value 
     */
    public function setPressed($value)
    {
    	$this->setConfig("pressed",$value);
    }

    /**
     * Gets the value of ExtJS repeat property
     * @return Boolean/Object 
     */
    public function getRepeat()
    {
    	return $this->getConfig("repeat");
    }

    /**
     * Sets the value of ExtJS repeat property
     * @param Boolean/Object $value 
     */
    public function setRepeat($value)
    {
    	$this->setConfig("repeat",$value);
    }

    /**
     * Gets the value of ExtJS scale property
     * @return String 
     */
    public function getScale()
    {
    	return $this->getConfig("scale");
    }

    /**
     * Sets the value of ExtJS scale property
     * @param String $value 
     */
    public function setScale($value)
    {
    	$this->setConfig("scale",$value);
    }

    /**
     * Gets the value of ExtJS tabIndex property
     * @return Number 
     */
    public function getTabIndex()
    {
    	return $this->getConfig("tabindex");
    }

    /**
     * Sets the value of ExtJS tabIndex property
     * @param Number $value 
     */
    public function setTabIndex($value)
    {
    	$this->setConfig("tabindex",$value);
    }

    /**
     * Gets the value of ExtJS text property
     * @return String 
     */
    public function getText()
    {
    	return $this->getConfig("text");
    }

    /**
     * Sets the value of ExtJS text property
     * @param String $value 
     */
    public function setText($value)
    {
    	$this->setConfig("text",$value);
    }

    /**
     * Gets the value of ExtJS toggleGroup property
     * @return String 
     */
    public function getToggleGroup()
    {
    	return $this->getConfig("togglegroup");
    }

    /**
     * Sets the value of ExtJS toggleGroup property
     * @param String $value 
     */
    public function setToggleGroup($value)
    {
    	$this->setConfig("togglegroup",$value);
    }

    /**
     * Gets the value of ExtJS toggleHandler property
     * @return Function 
     */
    public function getToggleHandler()
    {
    	return $this->getConfig("togglehandler");
    }

    /**
     * Sets the value of ExtJS toggleHandler property
     * @param Function $value 
     */
    public function setToggleHandler($value)
    {
    	$this->setConfig("togglehandler",$value);
    }

    /**
     * Gets the value of ExtJS tooltip property
     * @return String/Object 
     */
    public function getTooltip()
    {
    	return $this->getConfig("tooltip");
    }

    /**
     * Sets the value of ExtJS tooltip property
     * @param String/Object $value 
     */
    public function setTooltip($value)
    {
    	$this->setConfig("tooltip",$value);
    }

    /**
     * Gets the value of ExtJS tooltipType property
     * @return String 
     */
    public function getTooltipType()
    {
    	return $this->getConfig("tooltiptype");
    }

    /**
     * Sets the value of ExtJS tooltipType property
     * @param String $value 
     */
    public function setTooltipType($value)
    {
    	$this->setConfig("tooltiptype",$value);
    }

    /**
     * Gets the value of ExtJS type property
     * @return String 
     */
    public function getType()
    {
    	return $this->getConfig("type");
    }

    /**
     * Sets the value of ExtJS type property
     * @param String $value 
     */
    public function setType($value)
    {
    	$this->setConfig("type",$value);
    }

    /**
     * Gets the value of ExtJS formBind property
     * @return Boolean 
     */
    public function getFormBind()
    {
    	return $this->getConfig("formbind");
    }

    /**
     * Sets the value of ExtJS formBind property
     * @param Boolean $value 
     */
    public function setFormBind($value)
    {
    	$this->setConfig("formbind",$value);
    }

    /**
     * @description maps to the hideMenu function in Ext.Button
     * @param sender String -
     */
    public static function hideMenu_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('hideMenu()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the setHandler function in Ext.Button
     * @param sender String -
     * @param handler Function -
     * @param scope Object optional 
     */
    public static function setHandler_OnAjax($handler,$scope=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setHandler(%s,%s)',
    		array($handler,$scope),
    			 $sender);
    }

    /**
     * @description maps to the setIcon function in Ext.Button
     * @param sender String -
     * @param icon String - 
     */
    public static function setIcon_OnAjax($icon,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setIcon("%s")',
    		array(str_replace('"','\"',$icon)),
    			 $sender);
    }

    /**
     * @description maps to the setIconClass function in Ext.Button
     * @param sender String -
     * @param cls String - 
     */
    public static function setIconClass_OnAjax($cls,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setIconClass("%s")',
    		array(str_replace('"','\"',$cls)),
    			 $sender);
    }

    /**
     * @description maps to the setText function in Ext.Button
     * @param sender String -
     * @param text String - 
     */
    public static function setText_OnAjax($text,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setText("%s")',
    		array(str_replace('"','\"',$text)),
    			 $sender);
    }

    /**
     * @description maps to the setTooltip function in Ext.Button
     * @param sender String -
     * @param tooltip String/Object - 
     */
    public static function setTooltip_OnAjax($tooltip,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setTooltip(%s)',
    		array($tooltip),
    			 $sender);
    }

    /**
     * @description maps to the showMenu function in Ext.Button
     * @param sender String -
     */
    public static function showMenu_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('showMenu()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the toggle function in Ext.Button
     * @param sender String -
     * @param state Boolean optional
     * @param supressEvent Boolean optional 
     */
    public static function toggle_OnAjax($state=null,$supressEvent=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('toggle(%s,%s)',
    		array($state,$supressEvent),
    			 $sender);
    }

    
    public function __construct()
    {
        parent::__construct();
        $this->configmap = array_merge($this->configmap,array(
            'allowdepress' => 'allowDepress',
            'arrowalign' => 'arrowAlign',
            'autowidth' => 'autoWidth',
            'buttonselector' => 'buttonSelector',
            'clickevent' => 'clickEvent',
            'enabletoggle' => 'enableToggle',
            'handlemouseevents' => 'handleMouseEvents',
            'iconalign' => 'iconAlign',
            'iconcls' => 'iconCls',
            'menualign' => 'menuAlign',
            'minwidth' => 'minWidth',
            'overflowtext' => 'overflowText',
            'tabindex' => 'tabIndex',
            'togglegroup' => 'toggleGroup',
            'togglehandler' => 'toggleHandler',
            'tooltiptype' => 'tooltipType',
            'formbind' => 'formBind'
        ));

        $this->eventtable = array_merge($this->eventtable,array(
            'click' => array('sender','e'),
            'menuhide' => array('sender','menu'),
            'menushow' => array('sender','menu'),
            'menutriggerout' => array('sender','menu','e'),
            'menutriggerover' => array('sender','menu','e'),
            'mouseout' => array('sender','e'),
            'mouseover' => array('sender','e'),
            'toggle' => array('sender','pressed')
        ));

        $this->jsconfigs = array_merge($this->jsconfigs,array(
            'handler' => true,
            'toggleHandler' => true
        ));

        $this->proptags = array_merge($this->proptags,array(
            'menu' => true,
            'tooltip' => true
        ));
        $this->setXType('button');
        $this->setXClass('Ext.Button');
    }    
}
?>